<%@ page import="java.util.List" %>
<%@ page import="top.xuwuqiang.study.webdemo.ebtity.TbComputer" %>
<%@ page import="top.xuwuqiang.study.webdemo.dao.TbComputerDAO" %><%--
  Created by IntelliJ IDEA.
  User: 17505
  Date: 2024/6/3
  Time: 12:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>电脑列表</title>
</head>
<body>
<%
    List<TbComputer> list = TbComputerDAO.query();
%>

<h1>
    <a href="insert.jsp">电脑添加</a>
</h1>
<table border="1" style="width:100%">
    <thead>


    <tr>
        <td>主键</td>
        <td>厂商</td>
        <td>电脑简介</td>
        <td>电脑价格</td>
        <td>操作</td>
    </tr>


    </thead>
    <tbody>
    <%
        for (TbComputer tbComputer : list) {
    %>
    <tr>
        <td><%=tbComputer.getId()%>
        </td>
        <td><%=tbComputer.getChangshang()%>
        </td>
        <td><%=tbComputer.getDnjj()%>
        </td>
        <td><%=tbComputer.getPrice()%>
        </td>
        <td>
            <a href="delete.jsp?id=<%=tbComputer.getId()%>">删除</a>
        </td>
        >
    </tr>
    <%}%>
    </tbody>


</table>


</body>
</html>
